package cn.maidouya.user.controller;
import cn.maidouya.basic.constants.WeChatConstant;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 *  测试微信接口
 */
@Controller
@RequestMapping("/weChar")
public class WeChatController {
    @GetMapping("/toRequestCode")
    public String toRequestCode(){
        return "redirect:"+WeChatConstant.CODEURL.replace("APPID", WeChatConstant.APPID)
                .replace("SECRET",WeChatConstant.SECRET)
                .replace("REDIRECT_URI", WeChatConstant.REDIRECT_URI);
    }
}